﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NewRen.Models
{
    /// <summary>
    /// 主题
    /// </summary>
    public class Topic
    {

        public int ID { get; set; }


        public string Title { get; set; }


        public string Content { get; set; }


        public bool Top { get; set; }

        /// <summary>
        /// 发表时间
        /// </summary>
        public DateTime Time { set; get; }

        /// <summary>
        /// 上次回复时间
        /// </summary>
        public DateTime? LastReply { get; set; }



        [ForeignKey("Plate")]
        public int PlateID { get; set; }

        public virtual Plate Plate { get; set; }

        [ForeignKey("User")]
        public int UserID { get; set; }

        public virtual User User { get; set; }

        public int Reward { get; set; }

        public virtual ICollection<Reply> Replies { get; set; }

        /// <summary>
        /// 浏览
        /// </summary>
        public int Browses { get; set; }

        /// <summary>
        /// 举报
        /// </summary>
        public int Report { get; set; }

        /// <summary>
        /// 是否显示
        /// </summary>
        public bool IsShow { set; get; }


        /// <summary>
        /// 是否板块关闭
        /// </summary>
        public bool IsColse { set; get; }

        /// <summary>
        /// 是否官方认证
        /// </summary>
        public bool IsOfficeIdentified { set; get; }
    }
}
